<template>
  <div>
    <TypeNav></TypeNav>
    <Listcontainer></Listcontainer>
    <TodayRecommend></TodayRecommend>
    <HomeRank></HomeRank>
    <HomeLike></HomeLike>
    <FloorOne
      v-for="(item, index) in floorList"
      :key="index"
      :floor="item"
    ></FloorOne>

    <Brand></Brand>
  </div>
</template>

<script>
import Listcontainer from './Listcontainer'
import TodayRecommend from './TodayRecommend'
import HomeRank from './HomeRank'
import HomeLike from './HomeLike'
import FloorOne from './FloorOne'
import Brand from './Brand'
import { mapState } from 'vuex'
export default {
  name: 'Home',
  components: {
    Listcontainer,
    TodayRecommend,
    HomeRank,
    HomeLike,
    FloorOne,
    Brand,
  },

  mounted() {
    this.getFloorList()
  },
  methods: {
    getFloorList() {
      this.$store.dispatch('getFloorList')
    },
  },
  computed: {
    ...mapState({
      floorList: (state) => state.home.floorList,
      token: (state) => state.user.token,
    }),
  },
}
</script>

<style lang="less" scoped></style>
